package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.provider.model.domain.MediaOrderdRecord;
import com.weixing.mall.provider.model.query.MediaOrderRecordQuery;
import com.weixing.mall.provider.model.query.MediaOrderRecordsQuery;
import com.weixing.mall.provider.model.vo.FrontMediaRecordVo;
import com.weixing.mall.provider.model.vo.ads.MediaOrderRecordDetilVo;
import com.weixing.mall.provider.model.vo.ads.MediaOrderRecordShowVo;
import com.weixing.mall.provider.model.vo.ads.MediaOrderRecordsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 代理商抢购记录 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-18
 */
public interface MediaOrderdRecordMapper extends BaseMapper<MediaOrderdRecord> {

    IPage<MediaOrderRecordsVo> selectOfPage(@Param("pg") Page page,@Param("qs") MediaOrderRecordsQuery sQuery,@Param("array") List<Integer> list);

    List<MediaOrderRecordShowVo> getList(Long adId);

    List<MediaOrderRecordDetilVo> selectListByAgentId(Long agentId);

    int selectNum( @Param("qs") MediaOrderRecordQuery mediaOrderRecordQuery);

    int selectOrderNum(@Param("adId")Long adId);

    void changeRecordStatus(@Param("id")long id, @Param("value")int value);

    IPage<FrontMediaRecordVo> selectMyMediaOrder(@Param("pg")Page page,@Param("qs")MediaOrderRecordQuery mediaOrderRecordQuery);

    MediaOrderRecordDetilVo lastApplyTime(@Param("id")Long id,@Param("agentId")Long agentId);
}
